const jwt = require('jsonwebtoken');
const verifyHelper = {}

// 验证token
verifyHelper.token = async function(ctx) {
	const clientToken = ctx.headers.authorization.split(' ')[1];
	let verifyToken = null;
	verifyToken = await jwt.verify(clientToken, 'secret');
	return true;
}

module.exports = verifyHelper